package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.BusZhncCompaniesMapper;
import com.ruoyi.business.domain.BusZhncCompanies;
import com.ruoyi.business.service.IBusZhncCompaniesService;

/**
 * 入驻企业Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-04
 */
@Service
public class BusZhncCompaniesServiceImpl implements IBusZhncCompaniesService 
{
    @Autowired
    private BusZhncCompaniesMapper busZhncCompaniesMapper;

    /**
     * 查询入驻企业
     * 
     * @param id 入驻企业主键
     * @return 入驻企业
     */
    @Override
    public BusZhncCompanies selectBusZhncCompaniesById(Long id)
    {
        return busZhncCompaniesMapper.selectBusZhncCompaniesById(id);
    }

    /**
     * 查询入驻企业列表
     * 
     * @param busZhncCompanies 入驻企业
     * @return 入驻企业
     */
    @Override
    public List<BusZhncCompanies> selectBusZhncCompaniesList(BusZhncCompanies busZhncCompanies)
    {
        return busZhncCompaniesMapper.selectBusZhncCompaniesList(busZhncCompanies);
    }

    /**
     * 新增入驻企业
     * 
     * @param busZhncCompanies 入驻企业
     * @return 结果
     */
    @Override
    public int insertBusZhncCompanies(BusZhncCompanies busZhncCompanies)
    {
        busZhncCompanies.setCreateTime(DateUtils.getNowDate());
        return busZhncCompaniesMapper.insertBusZhncCompanies(busZhncCompanies);
    }

    /**
     * 修改入驻企业
     * 
     * @param busZhncCompanies 入驻企业
     * @return 结果
     */
    @Override
    public int updateBusZhncCompanies(BusZhncCompanies busZhncCompanies)
    {
        busZhncCompanies.setUpdateTime(DateUtils.getNowDate());
        return busZhncCompaniesMapper.updateBusZhncCompanies(busZhncCompanies);
    }

    /**
     * 批量删除入驻企业
     * 
     * @param ids 需要删除的入驻企业主键
     * @return 结果
     */
    @Override
    public int deleteBusZhncCompaniesByIds(Long[] ids)
    {
        return busZhncCompaniesMapper.deleteBusZhncCompaniesByIds(ids);
    }

    /**
     * 删除入驻企业信息
     * 
     * @param id 入驻企业主键
     * @return 结果
     */
    @Override
    public int deleteBusZhncCompaniesById(Long id)
    {
        return busZhncCompaniesMapper.deleteBusZhncCompaniesById(id);
    }
}
